import {Component} from "@angular/core";
import {ProductService} from "./service/product.service";
import {Product} from "./entity/Product";
/**
 * Created by Administrator on 2016/8/2.
 */
//定义一个root component\
@Component({selector:"product",
    templateUrl:"./app/app.html",
    providers:[ProductService]
})
export class AppComponent {
    
    private products:Product[];

    constructor(productService:ProductService){
        this.products = productService.getAllProduct();
    }
}

